package cn.rslee.uaas.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 描述：
 * 
 * <pre>HISTORY
 * ****************************************************************************
 *  ID   DATE           PERSON          REASON
 *  1    2016年3月1日         rslee               Create
 * ****************************************************************************
 * </pre>
 * @author rslee
 * @since 1.0
 */
@Controller
public class PageAction {

	@RequestMapping("/{page}")
	public String show(@PathVariable String page) {
		return page;
	}
	
	@RequestMapping("/p/{path}/{page}")
	public String page(@PathVariable String path,@PathVariable String page,Model m) {
		m.addAttribute("sysCode", "uaas-core");
		return path +"/"+page;
	}
	
	@RequestMapping("/")
	public String index(HttpServletRequest request) {
		return "login";
	}
}
